<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    var arr = [], res = [], ant = []
    for (var i = 1; i <= 100; i++) {
      if (i % 3 == 0) arr.push(i)
      if (i % 5 == 0) res.push(i)
      if (i % 5 == 0 && i % 3 == 0) ant.push(i)
    }
    console.log('3的倍数 ' + arr)
    console.log('5的倍数 ' + res)
    console.log('3/5 的公倍数 ' + ant)
  </script>
</body>

</html>